<template>
        <div>

            <el-form ref="form" :model="params" label-width="70px">
                <el-container>
                    <el-form-item>
                        <el-input v-model="params.val"></el-input>
                    </el-form-item>

                <el-form-item>
                    <el-select v-model="params.xlk" placeholder="请选择">
                        <el-option label="请选择" value=""></el-option>
                        <el-option label="案号搜索" value="caseNo"></el-option>
                        <el-option label="委托人搜素" value="caseWtr"></el-option>
                    </el-select>
                </el-form-item>
                <el-form-item>
                    <el-button type="primary" @click="search">检索</el-button>
                </el-form-item>
                </el-container>
            </el-form>


                <el-table
                        @row-click="handdle"
                        :data="pageResult.records"
                        border
                        style="width: 100%">
                    <el-table-column
                            fixed
                            prop="caseNo"
                            label="案号"
                            width="180">
                    </el-table-column>
                    <el-table-column
                            prop="caseWtr"
                            label="委托人"
                            width="180">
                    </el-table-column>
                    <el-table-column
                            prop="caseOppositeParties"
                            label="对方当事人"
                            width="180">
                    </el-table-column>
                    <el-table-column
                            prop="casePaidsal"
                            label="已到款"
                            width="180">
                    </el-table-column>
                    <el-table-column
                            prop="caseInvoiced"
                            label="已开票"
                            width="190">
                    </el-table-column>
                </el-table>
            <el-footer class="case-exam-footer">
                <el-pagination
                        background
                        layout="prev, pager, next"
                        :total="pageResult.total"
                        :page-size="pageResult.size"
                        class="pagination"
                        @current-change="handleIndexChange"
                >
                </el-pagination>
            </el-footer>
        </div>
</template>

<script>

    import OnFileService from '../../../model/mfy/onFile/OnFileService.js'
    var  onFileService =OnFileService.getInstance();


    export default {
        name: "recordcaseLaw",
        data(){
            return{
                pageResult:{},
                params:{},
            }
        },
        methods:{
            //查询所有案件
            SelectNoRecordCaselaw(){
                onFileService.SelectNoRecordCaselaw(this.params).then((response)=>{
                    this.pageResult=response.data.data
                });
            },
        handleIndexChange(index){
            this.params.page = index
            this.SelectNoRecordCaselaw()
        },
        search(){
            this.params.page=1
            this.SelectNoRecordCaselaw()
        },
            handdle(row){
                this.$emit("caseNo",row.caseNo)
            },
        },

        created() {
            this.SelectNoRecordCaselaw();
        },
    }
</script>

<style scoped>

</style>